// Copyright (c) Appeon. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

using System;
using System.Collections.Generic;

namespace SnapObjects.Data.SqlServer
{
    public class SqlServerSqlKeywords : SqlKeywords
    {
        private static readonly IDictionary<string, SqlKeywords> _sqlmembers
            = new Dictionary<string, SqlKeywords>(
                _members, StringComparer.OrdinalIgnoreCase);

        protected SqlServerSqlKeywords(string name) : base(name)
        {

        }

        protected override void Register(string name)
        {
            if (!_sqlmembers.ContainsKey(name))
            {
                _sqlmembers.Add(name, this);
            }

            _name = name;
        }

        public static new bool IsKeyword(string value)
        {
            return _sqlmembers.ContainsKey(value);
        }

        public static new SqlKeywords Parse(string value)
        {
            if (_sqlmembers.ContainsKey(value))
            {
                return _sqlmembers[value];
            }

            return NOTHING;
        }

        public static readonly SqlServerSqlKeywords AUTO = new SqlServerSqlKeywords("AUTO");

        public static readonly SqlServerSqlKeywords BACKUP = new SqlServerSqlKeywords("BACKUP");
        public static readonly SqlServerSqlKeywords BREAK = new SqlServerSqlKeywords("BREAK");
        public static readonly SqlServerSqlKeywords BROWSE = new SqlServerSqlKeywords("BROWSE");
        public static readonly SqlServerSqlKeywords BULK = new SqlServerSqlKeywords("BULK");

        public static readonly SqlServerSqlKeywords CHECKPOINT = new SqlServerSqlKeywords("CHECKPOINT");
        public static readonly SqlServerSqlKeywords CLUSTERED = new SqlServerSqlKeywords("CLUSTERED");
        public static readonly SqlServerSqlKeywords COMPUTE = new SqlServerSqlKeywords("COMPUTE");
        public static readonly SqlServerSqlKeywords CONTAINS = new SqlServerSqlKeywords("CONTAINS");
        public static readonly SqlServerSqlKeywords CONTAINSTABLE = new SqlServerSqlKeywords("CONTAINSTABLE");

        public static readonly SqlServerSqlKeywords DATABASE = new SqlServerSqlKeywords("DATABASE");
        public static readonly SqlServerSqlKeywords DBCC = new SqlServerSqlKeywords("DBCC");
        public static readonly SqlServerSqlKeywords DENY = new SqlServerSqlKeywords("DENY");
        public static readonly SqlServerSqlKeywords DISK = new SqlServerSqlKeywords("DISK");
        public static readonly SqlServerSqlKeywords DISTRIBUTED = new SqlServerSqlKeywords("DISTRIBUTED");
        public static readonly SqlServerSqlKeywords DISTRIBUTED_AGG = new SqlServerSqlKeywords("DISTRIBUTED_AGG");
        public static readonly SqlServerSqlKeywords DUMP = new SqlServerSqlKeywords("DUMP");

        public static readonly SqlServerSqlKeywords ERRLVL = new SqlServerSqlKeywords("ERRLVL");
        public static readonly SqlServerSqlKeywords EXIT = new SqlServerSqlKeywords("EXIT");
        public static readonly SqlServerSqlKeywords ELEMENTS = new SqlServerSqlKeywords("ELEMENTS");

        public static readonly SqlServerSqlKeywords FAST = new SqlServerSqlKeywords("FAST");
        public static readonly SqlServerSqlKeywords FILE = new SqlServerSqlKeywords("FILE");
        public static readonly SqlServerSqlKeywords FILLFACTOR = new SqlServerSqlKeywords("FILLFACTOR");
        public static readonly SqlServerSqlKeywords FREETEXT = new SqlServerSqlKeywords("FREETEXT");
        public static readonly SqlServerSqlKeywords FREETEXTTABLE = new SqlServerSqlKeywords("FREETEXTTABLE");
        public static readonly SqlServerSqlKeywords FUNCTION = new SqlServerSqlKeywords("FUNCTION");
        public static readonly SqlServerSqlKeywords FORCE = new SqlServerSqlKeywords("FORCE");
        public static readonly SqlServerSqlKeywords FOLLOWING = new SqlServerSqlKeywords("FOLLOWING");

        public static readonly SqlServerSqlKeywords GROUPING = new SqlServerSqlKeywords("GROUPING");

        public static readonly SqlServerSqlKeywords HOLDLOCK = new SqlServerSqlKeywords("HOLDLOCK");
        public static readonly SqlServerSqlKeywords HASH = new SqlServerSqlKeywords("HASH");

        public static readonly SqlServerSqlKeywords IDENTITY_INSERT = new SqlServerSqlKeywords("IDENTITY_INSERT");
        public static readonly SqlServerSqlKeywords IDENTITYCOL = new SqlServerSqlKeywords("IDENTITYCOL");
        public static readonly SqlServerSqlKeywords IF = new SqlServerSqlKeywords("IF");

        public static readonly SqlServerSqlKeywords KILL = new SqlServerSqlKeywords("KILL");

        public static readonly SqlServerSqlKeywords LINENO = new SqlServerSqlKeywords("LINENO");
        public static readonly SqlServerSqlKeywords LOAD = new SqlServerSqlKeywords("LOAD");
        public static readonly SqlServerSqlKeywords LABEL = new SqlServerSqlKeywords("LABEL");

        public static readonly SqlServerSqlKeywords MAXDOP = new SqlServerSqlKeywords("MAXDOP");
        public static readonly SqlServerSqlKeywords MERGE = new SqlServerSqlKeywords("MERGE");

        public static readonly SqlServerSqlKeywords NOCHECK = new SqlServerSqlKeywords("NOCHECK");
        public static readonly SqlServerSqlKeywords NONCLUSTERED = new SqlServerSqlKeywords("NONCLUSTERED");

        public static readonly SqlServerSqlKeywords OFF = new SqlServerSqlKeywords("OFF");
        public static readonly SqlServerSqlKeywords OFFSETS = new SqlServerSqlKeywords("OFFSETS");
        public static readonly SqlServerSqlKeywords OFFSET = new SqlServerSqlKeywords("OFFSET");
        public static readonly SqlServerSqlKeywords OPENDATASOURCE = new SqlServerSqlKeywords("OPENDATASOURCE");
        public static readonly SqlServerSqlKeywords OPENQUERY = new SqlServerSqlKeywords("OPENQUERY");
        public static readonly SqlServerSqlKeywords OPENROWSET = new SqlServerSqlKeywords("OPENROWSET");
        public static readonly SqlServerSqlKeywords OPENXML = new SqlServerSqlKeywords("OPENXML");
        public static readonly SqlServerSqlKeywords OVER = new SqlServerSqlKeywords("OVER");

        public static readonly SqlServerSqlKeywords PERCENT = new SqlServerSqlKeywords("PERCENT");
        public static readonly SqlServerSqlKeywords PIVOT = new SqlServerSqlKeywords("PIVOT");
        public static readonly SqlServerSqlKeywords PLAN = new SqlServerSqlKeywords("PLAN");
        public static readonly SqlServerSqlKeywords PRINT = new SqlServerSqlKeywords("PRINT");
        public static readonly SqlServerSqlKeywords PROC = new SqlServerSqlKeywords("PROC");
        public static readonly SqlServerSqlKeywords PARTITION = new SqlServerSqlKeywords("PARTITION");
        public static readonly SqlServerSqlKeywords PRECEDING = new SqlServerSqlKeywords("PRECEDING");

        public static readonly SqlServerSqlKeywords RAISERROR = new SqlServerSqlKeywords("RAISERROR");
        public static readonly SqlServerSqlKeywords READTEXT = new SqlServerSqlKeywords("READTEXT");
        public static readonly SqlServerSqlKeywords RECONFIGURE = new SqlServerSqlKeywords("RECONFIGURE");
        public static readonly SqlServerSqlKeywords REPLICATION = new SqlServerSqlKeywords("REPLICATION");
        public static readonly SqlServerSqlKeywords RESTORE = new SqlServerSqlKeywords("RESTORE");
        public static readonly SqlServerSqlKeywords RETURN = new SqlServerSqlKeywords("RETURN");
        public static readonly SqlServerSqlKeywords REVERT = new SqlServerSqlKeywords("REVERT");
        public static readonly SqlServerSqlKeywords REDISTRIBUTE = new SqlServerSqlKeywords("REDISTRIBUTE");
        public static readonly SqlServerSqlKeywords REDUCE = new SqlServerSqlKeywords("REDUCE");
        public static readonly SqlServerSqlKeywords REPLICATE = new SqlServerSqlKeywords("REPLICATE");
        public static readonly SqlServerSqlKeywords ROWCOUNT = new SqlServerSqlKeywords("ROWCOUNT");
        public static readonly SqlServerSqlKeywords ROWGUIDCOL = new SqlServerSqlKeywords("ROWGUIDCOL");
        public static readonly SqlServerSqlKeywords RULE = new SqlServerSqlKeywords("RULE");
        public static readonly SqlServerSqlKeywords ROW = new SqlServerSqlKeywords("ROW");

        public static readonly SqlServerSqlKeywords SAVE = new SqlServerSqlKeywords("SAVE");
        public static readonly SqlServerSqlKeywords SECURITYAUDIT = new SqlServerSqlKeywords("SECURITYAUDIT");
        public static readonly SqlServerSqlKeywords SEMANTICKEYPHRASETABLE = new SqlServerSqlKeywords("SEMANTICKEYPHRASETABLE");
        public static readonly SqlServerSqlKeywords SEMANTICSIMILARITYDETAILSTABLE = new SqlServerSqlKeywords("SEMANTICSIMILARITYDETAILSTABLE");
        public static readonly SqlServerSqlKeywords SEMANTICSIMILARITYTABLE = new SqlServerSqlKeywords("SEMANTICSIMILARITYTABLE");
        public static readonly SqlServerSqlKeywords SETUSER = new SqlServerSqlKeywords("SETUSER");
        public static readonly SqlServerSqlKeywords SHUTDOWN = new SqlServerSqlKeywords("SHUTDOWN");
        public static readonly SqlServerSqlKeywords STATISTICS = new SqlServerSqlKeywords("STATISTICS");

        public static readonly SqlServerSqlKeywords TABLESAMPLE = new SqlServerSqlKeywords("TABLESAMPLE");
        public static readonly SqlServerSqlKeywords TEXTSIZE = new SqlServerSqlKeywords("TEXTSIZE");
        public static readonly SqlServerSqlKeywords TOP = new SqlServerSqlKeywords("TOP");
        public static readonly SqlServerSqlKeywords TRAN = new SqlServerSqlKeywords("TRAN");
        public static readonly SqlServerSqlKeywords TRIGGER = new SqlServerSqlKeywords("TRIGGER");
        public static readonly SqlServerSqlKeywords TRUNCATE = new SqlServerSqlKeywords("TRUNCATE");
        public static readonly SqlServerSqlKeywords TRY_CONVERT = new SqlServerSqlKeywords("TRY_CONVERT");
        public static readonly SqlServerSqlKeywords TSEQUAL = new SqlServerSqlKeywords("TSEQUAL");
        public static readonly SqlServerSqlKeywords TYPE = new SqlServerSqlKeywords("TYPE");
        public static readonly SqlServerSqlKeywords TIES = new SqlServerSqlKeywords("TIES");

        public static readonly SqlServerSqlKeywords UNPIVOT = new SqlServerSqlKeywords("UNPIVOT");
        public static readonly SqlServerSqlKeywords UPDATETEXT = new SqlServerSqlKeywords("UPDATETEXT");
        public static readonly SqlServerSqlKeywords USE = new SqlServerSqlKeywords("USE");
        public static readonly SqlServerSqlKeywords UNBOUNDED = new SqlServerSqlKeywords("UNBOUNDED");

        public static readonly SqlServerSqlKeywords WAITFOR = new SqlServerSqlKeywords("WAITFOR");
        public static readonly SqlServerSqlKeywords WHILE = new SqlServerSqlKeywords("WHILE");
        public static readonly SqlServerSqlKeywords WITHINGROUP = new SqlServerSqlKeywords("WITHIN GROUP");
        public static readonly SqlServerSqlKeywords WRITETEXT = new SqlServerSqlKeywords("WRITETEXT");

        public static readonly SqlServerSqlKeywords XML = new SqlServerSqlKeywords("XML");
        public static readonly SqlServerSqlKeywords XSINIL = new SqlServerSqlKeywords("XSINIL");
        public static readonly SqlServerSqlKeywords XMLSCHEMA = new SqlServerSqlKeywords("XMLSCHEMA");
    }
}
